package com.jordi.tetris.model;


public class Block {
	
	public enum BlockState {
		O,
		X
	}
	
	private BlockState state;
	private Piece piece;
	
	public Block(BlockState state) {
		this(state, null);
	}
	
	public Block(BlockState state, Piece piece) {
		this.state = state;
		this.piece = piece;
	}
	
	public Piece getPiece() {
		return piece;
	}

	public boolean isEmpty() {
		return state == BlockState.O;
	}

	@Override
	public String toString() {
		return state.toString();
	}
	
}
